This page last changed on Apr 29, 2007 by scytacki.

An OTrunk curnit is an archive that can be "run" by the SDS. There are two attached to this page:

Unknown macro: {attachments}

There are two ways to structure the data in an OTrunk curnit. Either the otml file can be an external link the curnit references, or the otml file can be embedded in the curnit.

Basic curnit structure

The curnit is a zip file. It contains xml files and properties files and sometimes nested zip files.

curnit.xml

It looks like this:

<?xml version="1.0" encoding="UTF-8"?> 
<java version="1.5.0_06" class="java.beans.XMLDecoder"> 
 <object class="net.sf.sail.core.curnit.Curnit"> 
  <void property="curnitId"> 
   <object class="net.sf.sail.core.uuid.CurnitUuid"> 
    <string>cccccccc-0009-0000-0000-000000000000</string> 
   </object> 
  </void> 
  <void property="rootPodId"> 
   <object class="net.sf.sail.core.uuid.PodUuid"> 
    <string>dddddddd-0002-0000-0000-000000000000</string> 
   </object> 
  </void> 
  <void property="title"> 
   <string>OTRUNK_CURNIT_TEST</string> 
  </void> 
 </object> 
</java>

This file determines the starting pod of the curnit, the title of the curnit, and the id of the curnit.

  • The title of the curnit will probably be ignored.
  • the starting pod (rootPodId) should match the name of the pod file also in the archive.
  • the curnitId should be unique for each curnit created. You can use uuid services to make this id or most likely you can find a library for the languague you are using.

POD_*.xml

This file setups up the OTrunk parts of the curnit. The entire file looks like:

<?xml version="1.0" encoding="UTF-8"?> 
<java version="1.5.0_06" class="java.beans.XMLDecoder"> 
 <object id="Pod0" class="net.sf.sail.core.beans.Pod"> 
  <void method="add"> 
   <object id="Rim0" class="net.sf.sail.core.entity.Rim"> 
    <void property="beanContext"> 
     <object idref="Pod0"/> 
    </void> 
    <void property="name"> 
     <string>ot.learner.data</string> 
    </void> 
    <void property="shape"> 
     <class>[B</class> 
    </void> 
   </object> 
  </void> 
  <void method="add"> 
   <object class="org.telscenter.sailotrunk.SailOTViewer"> 
    <void property="authoredDataURL"> 
     <object class="java.net.URL"> 
      <string>http://teemss2.concord.org/test-otrunk/document-textbox.otml</string> 
     </object> 
    </void> 
    <void property="beanContext"> 
     <object idref="Pod0"/> 
    </void> 
    <void property="userMode"> 
     <int>1</int> 
    </void> 
    <void property="hideTree">
     <boolean>true</boolean>
    </void>
    <void property="workRim"> 
     <object idref="Rim0"/> 
    </void> 
   </object> 
  </void> 
  <void property="podId"> 
   <object class="net.sf.sail.core.uuid.PodUuid"> 
    <string>dddddddd-0002-0000-0000-000000000000</string> 
   </object> 
  </void> 
 </object> 
</java> 

Much of this file is boilerplate, so you don't need to mess with it.

Further details on elements inside the POD.xml file:

  • podId
      <void property="podId"> 
       <object class="net.sf.sail.core.uuid.PodUuid"> 
        <string>dddddddd-0002-0000-0000-000000000000</string> 
       </object> 
      </void> 
    

    needs to match the file name of the file, and the rootPodId in the curnit.xml file.

  • authoredDataURL
    • Specifying the otml with an URL pointing to an external resource:
          <void property="authoredDataURL"> 
           <object class="java.net.URL"> 
            <string>http://teemss2.concord.org/test-otrunk/document-textbox.otml</string> 
           </object> 
          </void> 
      
    • Specifying the otml (and any related resources) with an URL pointing to an internal jar archive contained within the curnit archive:
          <void property="authoredDataURL"> 
           <object class="java.net.URL"> 
            <string>jar:podar:dddddddd-0002-0000-0000-000000000000!/document-textbox.otml</string> 
           </object> 
          </void> 
      

      There needs to be more files in the curnit to work, see below.

  • hideTree
        <void property="hideTree">
         <boolean>true</boolean>
        </void>
    

podsReferenced.properties

If the otml is external this file needs to exist but can be empty.

If the otml is stored inside the curnit, this file will look like this:

#pod dependencies
#Wed Jan 24 16:17:36 GMT 2007
dddddddd-0002-0000-0000-000000000000=withincurnit\:/tmp/podarchive54815.jar

This is a properties file so the key is everything before the '='.
The key is the id of the pod.
The value is the name of the file inside the zip file. When these curnits are created automatically these file names are cryptic urls. But the name you use can be any thing you want.
If the otml is stored inside the curnit then this file is required to be setup. curnit is embedded in the file

withincurnit/tmp/podarchive54815.jar

This file name can be anything, as long as that name is entered in the podsReferenced.properties file.
The file itself is a zip file. Inside of it should the otml file, the name of this otml is referenced in the POD_*.xml file. In this example that reference is:

    <void property="authoredDataURL"> 
     <object class="java.net.URL"> 
      <string>jar:podar:dddddddd-0002-0000-0000-000000000000!/document-textbox.otml</string> 
     </object> 
    </void> 

So the name of the otml file needs to be "document-textbox.otml".


otrunk-curnit-external-otml.jar (application/x-jar)
otrunk-curnit-included-otml.jar (application/x-jar)
otrunk-curnit-untangled.jar (application/x-jar)
otrunk-curnit-external-diytest.jar (application/java-archive)
otrunk-curnit-external-diytest.jar (application/java-archive)
otrunk-curnit-external-diytest.jar (application/java-archive)
Document generated by Confluence on Jan 27, 2014 16:52